package com.example;

/**
 * @desc:
 * @author: Shoko
 * @date: 2025/6/1
 */
// CommonMember.java
public class CommonMember extends Member {
    public CommonMember(String name) {
        super(name);
    }

    @Override
    public void sendText(String to, String message) {
        System.out.println("普通会员[" + name + "]发送文本给[" + to + "]");
        chatroom.sendText(name, to, message);
    }

    @Override
    public void sendImage(String to, String image) {
        System.out.println("普通会员不能发送图片");
    }

    @Override
    public void receiveText(String from, String message) {
        System.out.println("普通会员[" + name + "]收到来自[" + from + "]的文本: " + message);
    }

    @Override
    public void receiveImage(String from, String image) {
        System.out.println("普通会员[" + name + "]收到来自[" + from + "]的图片");
    }
}
